/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


// JavaScript Document


function init(){
    allInit();
	initdatapickers();
}

// datapickers per il form di ricerca avanzata
function initdatapickers() {
	var dates = $( "#data-from, #data-to" ).datepicker({
		onSelect: function( selectedDate ) {
			var option = this.id == "data-from" ? "minDate" : "maxDate",
				instance = $( this ).data( "datepicker" ),
				date = $.datepicker.parseDate(
					instance.settings.dateFormat ||
					$.datepicker._defaults.dateFormat,
					selectedDate, instance.settings );
			dates.not( this ).datepicker( "option", option, date );
			dates.regional["it"];
		}
	});
}


function initRicarica(){
    $(".home").removeClass("selected");
    $(".ricarica").addClass("selected");
}